Ektron CMS400.Net Reference

>>Using Widgets > Customizing Widgets > Verifying that a Page is a PageBuilder Page

Verifying that a Page is a PageBuilder Page

Whenever your code is interacting with a widget, you need to verify that it is on a page builder page (as opposed to another Ektron CMS400.NET page that hosts widgets, such as personalization).

To check for this, insert the following code:

Ektron.Cms.PageBuilder.PageBuilder p = (Page as PageBuilder);
If(p==null) // then this is not a wireframe
When you want to check the mode, use code like this.
If(p.status == Mode.Edit) // we are in edit mode

Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.